//
//  FSFindInterestingBtn.m
//  fanshu
//
//  Created by 许海峰 on 16/3/29.
//  Copyright © 2016年 FS. All rights reserved.
//

#import "FSFindInterestingBtn.h"

@implementation FSFindInterestingBtn
-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setTitle:@" 快去发现感兴趣的内容 " forState:UIControlStateNormal];
        [self setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
        
        [self.layer setMasksToBounds:YES];
        [self.layer setCornerRadius:20.0]; //设置矩形四个圆角半径
        [self.layer setBorderWidth:1.0]; //边框宽度
        
        CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
        CGColorRef colorref = CGColorCreate(colorSpace,(CGFloat[]){ 217.0 / 255, 110.0 / 255, 93 / 255, 1 });
        [self.layer setBorderColor:colorref];//设置颜色
        //调整高度
        [self sizeToFit];
        CGRect bounds = self.bounds;
        bounds.size.height = 40;
        self.bounds = bounds;
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
